019590ec-fa3c-7274-90f6-1b816ebb30ed
Tuist Logo

Swift Stories

View in web browser
Fons Mans UI design of a keys widget

Featured work: Fons Mans

#3 - Feb 7, 2025

Optimizing for joy

Welcome to issue 3!

We, as software crafters, often like to quantify things: downloads, sign-ups, average response time, app bundle size. Metrics give us confidence in certain aspects of our work, but they come at a cost—we often overlook other equally important factors in crafting great apps.

One of those factors is joy. We believe there is an unquantifiable relationship between the joy a developer experiences while building an app and the quality of the final product. When people enjoy what they do, they feel inspired to push the limits of what’s possible and explore new ideas.

Discussions about joy and happiness in software development are rare, but some frameworks, like Ruby on Rails, have made it a core principle. DHH describes how he drew inspiration from Ruby:

Ruby is full of optical illusions where that which seems simple, clear, and beautiful to our mind’s eye actually is an acrobatic mess of wires under the hood.

We believe that ideas have energy, and that energy can be eroded by the absence of joy. Picture this scenario: You’re a software crafter, and one day, you wake up with an exciting idea that you’d love to build into your app or your company’s product. You open your laptop, start working on it, and then—your project takes minutes to compile, only to fail. You just wanted to bring your idea to life, but instead, you spend hours debugging and wrestling with roadblocks. After all that frustration, your passion for the idea fades. Who knows? That idea might never see the light of day.

As an industry, we should embrace optimizing for joy as one of our guiding principles. Doing so requires an ongoing dialogue with ourselves. If you pause for a moment, you can probably think of aspects of app development that aren’t enjoyable. Is it slow build times? Struggling to debug an obscure signing issue? Wrestling with a new programming language’s mental models? Debugging data races, for example, was far from enjoyable—until Apple introduced a better concurrency model. However, in doing so, they may have slightly reduced the joy of writing Swift by pushing the limits of our cognitive capacity. And that’s okay! The pursuit of joy is an infinite game. You improve in one area, compromise in another, and then shift focus again until you find a balance that works for everyone.

Optimizing for joy might sound idealistic, but it could lead us to a better world. At first, it might feel frustrating because we’ll often rely on "gut feelings" rather than hard data. But many great ideas were born out of people having fun. And if you don’t believe me, read the book by Linus Torvalds.

So, the next time you encounter something that diminishes your joy in development, think about all the great ideas that have faded because of similar frustrations. And take a moment to act as a champion for happiness in software crafting.


Tools & sites

Bagels

A terminal-based expense tracker

Do you need a expense tracker and don't want to leave the terminal? Bagels is the answer. The quality of the UI is impressive, and it's a great way to keep track of your expenses.

depermaid

Visualize your package dependencies

Modularization is key to keeping your codebase maintainable, but at certain points, it can be hard to visualize the dependencies between your modules. Depermaid is a tool that generates a graph of your package dependencies, making it easier to understand the relationships between them. If you are using Tuist, this is akin to the tuist graph command.

uscope

A visual lldb debugger

Many people are excited about the idea of developing Swift apps outside of Xcode, but that requires decoupling experiences from Xcode. One of them is debugging, which is powered by lldb. Jim Calabro has been working on a visual debugger that runs on the terminal, making it easier to debug with LLDB. It doesn't work with Swift and macOS yet, but it's a promising start.

Expensaro UI

A SwiftUI design system

Thanks to SwiftUI, design systems are less necessary in the Apple ecosystem. However, if you're looking for a design system for your SwiftUI apps, you might want to check out Expensaro UI. It's a collection of components that you can use to build your apps faster.

Tapestry

A feeds aggregator

IconFactory, released a new app, Tapestry, which acts as an aggregator for your feeds. And the best part? They designed it to be extensible, a topic we discussed in our second issue. They leveraged Node for extensibility and already have plugins to aggregate content from platforms like Reddit or YouTube.


Worthy Five: Matt Massicotte

Matt Massicotte has been developing for Apple platforms for longer than he likes to admit. He spends time working on open source projects ChimeHQ, writing, and consulting/training specifically for Swift concurrency.

Matt Massicotte

An app worth installing:

I am constantly amazed at how much excellent Swift stuff I learn/discover from Mastodon. I've experimented with many clients, and I find Mona to be indispensable.


An open-source project worth checking out:

I've only had a few small opportunities to try out Swift on the server. But, I think Meridian is a really interesting option and something that more people should know about.


A developer tool worth using:

I had a hard time coming up with a choice here, but ultimately I settled on fish. I spend a fair bit of time at the command line, and I have found fish to be indispensable.


A developer worth following:

There are so many wonderful people in the Swift world, but Alexandra Jusino stands out. She shares her own real problems and frustrations, and also is consistently supportive when others do the same. I find that to be an excellent aspect if the Swift community and I'd love to see more.


A book worth reading:

I'm embarrassed to say I don't read less than I'd like. But, I got a great deal out of "Grit: The Power of Passion and Perseverance" by Angela Duckworth, both personally and professionally. Definitely worth checking out.


Food for thought

Bringing Swift Packages to Android

Read

Swift continues to expand its reach, and now you can use Swift packages in Android projects. Skip has a blog post that explains how to do it. You can check here which packages compile for Android.

Javascript Temporal

Read

If you write JavaScript in your Swift server apps, and miss having a proper date and time API, you might want to check out the upcoming Temporal API.

Swift Concurrency Glossary

Consult

Matt has been supportive in the ecosystem to help people understand the new concurrency model in Swift and decided to capture his knowledge in a glossary. If you're struggling with the new model, you might want to check it out.

An interview with Chris Lattner

Read

Did you know that Chris found it useful to work on Swift secretly to avoid many strong opinions about superficial things? In this interview he shares more about his career building Swift and LLVM, as well as his current work with Mojo.

macOS UI guidelines

Check out

Mario Guzman has created some UI guidelines for building macOS apps that fill some gaps in Apple's Human Interface Guidelines. If you're building a macOS app, you might want to check them out.